﻿/*** This script will only run if the version number in the databse is less than 01.00.00 ***/
if((SELECT count(*) FROM Version) = 0)
BEGIN
/*** Insert Default data ***/
DELETE FROM IWebWFSettings WHERE (Setting = N'AnonymousLogin')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'AnonymousLogin', N'True')
DELETE FROM IWebWFSettings WHERE (Setting = N'MaxLoginAttempts')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'MaxLoginAttempts', N'5')
DELETE FROM IWebWFSettings WHERE (Setting = N'SMTPServer')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'SMTPServer', N'')
DELETE FROM IWebWFSettings WHERE (Setting = N'SMTPSecure')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'SMTPSecure', N'False')
DELETE FROM IWebWFSettings WHERE (Setting = N'SMTPUserName')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'SMTPUserName', N'')
DELETE FROM IWebWFSettings WHERE (Setting = N'SMTPPassword')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'SMTPPassword', N'')
DELETE FROM IWebWFSettings WHERE (Setting = N'SMTPAuthendication')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'SMTPAuthendication', N'0')
DELETE FROM IWebWFSettings WHERE (Setting = N'SMTPFromEmail')
INSERT INTO IWebWFSettings(Setting, SettingValue) VALUES (N'SMTPFromEmail', N'')

	/** Update Version **/
	DELETE FROM Version
	INSERT INTO Version(VersionNumber) VALUES (N'01.00.00')
END